struct s
{
 struct s* sp;
 void (*sf)(void);
};


struct s s0;
struct s s1;
struct s s2;
struct s s3;
struct s s4;
struct s s5;
struct s s6;
struct s s7;
struct s s8;
struct s s9;
struct s sA;
struct s sB;
struct s sC;
struct s sD;
struct s sE;
struct s sF;


#define Ref(BASE, SUFFIX) \
  extern void BASE ## SUFFIX ## f(void); \
  struct s BASE ## SUFFIX = {&BASE, &BASE ## SUFFIX ## f}
  

#define Refs(BASE) \
  Ref(BASE, _0); \
  Ref(BASE, _1); \
  Ref(BASE, _2); \
  Ref(BASE, _3); \
  Ref(BASE, _4); \
  Ref(BASE, _5); \
  Ref(BASE, _6); \
  Ref(BASE, _7); \
  Ref(BASE, _8); \
  Ref(BASE, _9); \
  Ref(BASE, _A); \
  Ref(BASE, _B); \
  Ref(BASE, _C); \
  Ref(BASE, _D); \
  Ref(BASE, _E); \
  Ref(BASE, _F)




#define Refss(BASE) \
  Refs(BASE ## _0); \
  Refs(BASE ## _1); \
  Refs(BASE ## _2); \
  Refs(BASE ## _3); \
  Refs(BASE ## _4); \
  Refs(BASE ## _5); \
  Refs(BASE ## _6); \
  Refs(BASE ## _7); \
  Refs(BASE ## _8); \
  Refs(BASE ## _9); \
  Refs(BASE ## _A); \
  Refs(BASE ## _B); \
  Refs(BASE ## _C); \
  Refs(BASE ## _D); \
  Refs(BASE ## _E); \
  Refs(BASE ## _F)


#define Refsss(BASE) \
  Refss(BASE ## _0); \
  Refss(BASE ## _1); \
  Refss(BASE ## _2); \
  Refss(BASE ## _3); \
  Refss(BASE ## _4); \
  Refss(BASE ## _5); \
  Refss(BASE ## _6); \
  Refss(BASE ## _7); \
  Refss(BASE ## _8); \
  Refss(BASE ## _9); \
  Refss(BASE ## _A); \
  Refss(BASE ## _B); \
  Refss(BASE ## _C); \
  Refss(BASE ## _D); \
  Refss(BASE ## _E); \
  Refss(BASE ## _F)

#define Refssh(BASE) \
  Refss(BASE ## _0); \
  Refss(BASE ## _1); \
  Refss(BASE ## _2); \
  Refss(BASE ## _3); \
  Refss(BASE ## _4); \
  Refss(BASE ## _5); \
  Refss(BASE ## _6); \

#define threeSteps(BASE) \
  Refs(BASE); \
  Refss(BASE); \
  Refsss(BASE)

threeSteps(s0);
threeSteps(s1);
threeSteps(s2);
threeSteps(s3);


